﻿#region Copyright

// /*
// SilverlightInEnterprise
// SilverlightInEnterprise.Interfaces
// IScreenDefinition.cs
// 
// Author: Matt Van Horn
// Created 11/15/2011 8:20 PM
// Copyright: Silverlight in the Enterprise www.slinenterprise.com
// 
// Licensed under MS-PL http://www.opensource.org/licenses/MS-PL and while you 
// may use this in anyway you see fit and owe us nothing to do so, we wouldn't mind knowing that you got value out of the work we did (so we will do more) so 
// we ask that you leave a comment on www.slinenterprise.com or on the codeplex site slinenterprise.codeplex.com
// 
// */

#endregion

using System;
using System.Collections.Generic;

namespace SilverlightInEnterprise.Interfaces.Screens
{
    public interface IScreenDefinition
    {
        Type ScreenInstanceType { get; }
        string ScreenTypeName { get; }
        bool AllowManyInstances { get; }

        /// <summary>
        ///   this is called when a unsaved screen should be over written by some other screen
        ///   because the screen defination allows only one instance.
        ///   it will return true if the screen that is atempting to be changed allowed the change
        /// </summary>
        Func<IScreen, bool> CallbackForAttemptToChangeScreen { get; }

        /// <summary>
        ///   this will create an instance of the screen
        /// </summary>
        Func<Dictionary<string, object>, IScreen> CreateInstanceOfScreen { get; }

        IEnumerable<string> KnownArguments { get; }
    }
}